package LaCollaFS.Api;

import java.net.InetAddress;
import java.net.UnknownHostException;
import java.rmi.RemoteException;

import fuse.LaCollaFS.Api.ApiImpl;
import fuse.LaCollaFS.Api.ApiServer;
import junit.framework.TestCase;

public class testApiImpl extends TestCase {

	private static ApiServer aserv;

	private static String appIP;

	private static int appPort = 4321;
	
	private static ApiImpl a;

	public void testApiImpl() throws UnknownHostException {

			appIP = InetAddress.getLocalHost().getCanonicalHostName();
			aserv = new ApiServer(appIP, appPort);
			
			
		
	}

	public void testnewInstantMsg() {
		assertTrue(true);
		try {
			a = aserv.getASAI();
			p("testApiImpl: hooolaaa :" + a + aserv);
			a.newInstantMsg("hola", "jomateix", "jomateix",
					"<Accept><path>/</path><op>CanviarStat</op><id>2</id></Accept>");

		} catch (Exception e) {
			p("testApiImpl: ERROR!!!!!");

		}
		assertTrue(true);

	}

	private void p(String string) {
		System.out.println(string);

	}

}
